package sevice;

import model.User;

import dao.DaoFactory;

public class UserServiceImp implements UserService {
	public void save(User user) throws Exception {
		DaoFactory.getUserDAO().save(user);
	}

	public User findByEmail(String email) throws Exception {
		return DaoFactory.getUserDAO().findByEmail(email);
	}

	public User findById(int id) throws Exception {
		return DaoFactory.getUserDAO().findById(id);
	}

	public void update(User u) throws Exception {
		DaoFactory.getUserDAO().update(u);
	}

}
